home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / Information / Mac Programming Secrets 1.0.1 / Chapter 07 / Neat Stuff.h < prev    next >
Text File  |  1992-05-19  |  2KB  |  62 lines

  1. #define MIN(a, b) ((a) < (b) ? (a) : (b) )
  2.  
  3. extern WindowPtr    gFirstWindow;
  4.  
  5. #define kNewWindowID            128
  6.  
  7. #define rMiscStrings            129
  8. #define    sUntitledTitle            1
  9.  
  10.  
  11. typedef void (*SetUpProc)(void);
  12. typedef    void (*WindowActionProc)(WindowPtr theWindow);
  13. typedef void (*FinishUpProc)(void);
  14.  
  15. void        DoNewWindow(void);
  16. void        DoCloseWindow(WindowPtr theWindow);
  17. void        DoActivateWindow(WindowPtr theWindow, Boolean becomingActive);
  18. void        DoZoomWindow(WindowPtr window, short zoomDir, Boolean front);
  19.  
  20. void        DoTileWindows(void);
  21. void        TileSetup(void);
  22. void        TileTheWindow(WindowPtr theWindow);
  23.  
  24. void        DoStackWindows(void);
  25. void        StackSetup(void);
  26. void        StackTheWindow(WindowPtr theWindow);
  27.  
  28. void        DoSelectFromWindowsMenu(short menuItem);
  29. void        LookForSelectedWindow(WindowPtr theWindow);
  30.  
  31. void        AddWindowToMenu(WindowPtr theWindow);
  32. void        RemoveWindowFromMenu(WindowPtr theWindow);
  33. void        TweakLowerGuys(WindowPtr theWindow);
  34.  
  35. void        ForEachWindowDo(SetUpProc theStarter,
  36.                             WindowActionProc theDoer,
  37.                             FinishUpProc theEnder);
  38. void        ForEachWindowPerScreenDo(SetUpProc theStarter,
  39.                                         WindowActionProc theDoer,
  40.                                         FinishUpProc theEnder);
  41. void        CountWindows(WindowPtr theWindow);
  42.  
  43. WindowPtr    GetPreviouslyCreatedWindow(WindowPtr theWindow);
  44. void        LookForPreviousWindow(WindowPtr theWindow);
  45.  
  46. short        GetMenuItemForWindow(WindowPtr theWindow);
  47. void        CountSomeWindow(WindowPtr theWindow);
  48.  
  49. void        SetWindowBounds(WindowPtr theWindow, Rect newBounds);
  50.  
  51. Rect        GetWindowContentRect(WindowPtr window);
  52. Rect        GetWindowStructureRect(WindowPtr window);
  53. Rect        GetWindowDeviceRectNMB(WindowPtr window);
  54. Rect        GetWindowDeviceRect(WindowPtr window);
  55. GDHandle    GetWindowDevice(WindowPtr window);
  56. GDHandle    GetRectDevice(Rect globalRect);
  57. void        LocalToGlobalRect(Rect *aRect);
  58. Point        GetGlobalTopLeft(WindowPtr window);
  59. Rect        GetMainScreenRect(void);
  60.  
  61. void        CatenatePStrings(Str255 targetStr, Str255 appendStr);
  62.